<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	procTypeCd		= Request("procTypeCd")
	
	SQLTitle = "-- ■■■■ 단위공정 관리 상세 정보 ■■■■"
	
	SQL = "SELECT procTypeCd, procTypeNm, processCds, CONVERT(varchar(16), issueDt, 121) issueDt, flag " & vbcrlf & _
		  " FROM tblProcSet WHERE procTypeCd='" & procTypeCd & "'"

	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

	Set Rs=Server.CreateObject("ADODB.RecordSet")
	Rs.open SQL, DbCon, 1
	
	Response.write "<ProcSetDetail>" & vbcrlf

	If Rs.eof Or Rs.bof Then 
	Else 
		Do Until Rs.eof Or Rs.bof
			divProc = Split(rs("processCds"),",")
			For i=0 To UBound(divProc)
				If divProc(i) <> "" Then 
					If procSet <> "" Then 
						procSet = procSet & " -> "
					End If 
					procNm = aFieldValue("SELECT processNm FROM tblUnitProcess WHERE processCd='" & divProc(i) & "'")
					procSet = procSet & "[<b>" & (i+1) & "</b>. " & procNm & "]"
				End If 
			Next 

				Call mkXMLNode("procTypeCd", rs("procTypeCd"), 2)
				Call mkXMLNode("procTypeNm", rs("procTypeNm"), 2)
				Call mkXMLNode("processCds", rs("processCds"), 2)
				Call mkXMLNode("procSet", procSet, 2)
				Call mkXMLNode("flag", Rs("flag"), 2)

		Rs.movenext
		Loop 
	End If
	Response.write "</ProcSetDetail>" & vbcrlf
'	Call rsWithXML("Save OK!")
%>